﻿<?xml version="1.0" encoding="utf-8" ?>
<rules xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       replacementText="¤"
       unmatchedAction="EmitReplacement"
       author="Måns Björkman"
       title="Classical Mode - Quenya"
       copyright="Open source distributed without warranty of any kind"
       caseSensitive="false"
       xmlns="http://transcriber.codeplex.com/Rules.xsd">

  <!-- PUT INPUT INTO CANONICAL FORM -->

  <!-- replace q with kw -->
  <rule pattern="qu{0,1}(.{0,1})">
    <intermediate>kw$1</intermediate>
  </rule>

  <!-- replace c with k -->
  <rule pattern="c">
    <intermediate>k</intermediate>
  </rule>
  
  <!-- replace þ with th --> <!-- ADDED //MB -->
  <rule pattern="þ">
    <intermediate>th</intermediate>
  </rule>

  <!-- replace unicode æ with separate letters a and e -->
  <rule pattern="æ">
    <intermediate>ae</intermediate>
  </rule>

  <!-- remove mystery diacriticals -->
  <rule pattern="[äà]"> <!-- REMOVED â - this and ā if anything is used for long á //MB -->
    <intermediate>a</intermediate>
  </rule>

  <!-- remove mystery diacriticals -->
  <rule pattern="[ëè]"> <!-- REMOVED ê - see above //MB -->
    <intermediate>e</intermediate>
  </rule>

  <!-- remove mystery diacriticals -->
  <rule pattern="[ïì]"> <!-- REMOVED î - see above //MB -->
    <intermediate>i</intermediate>
  </rule>

  <!-- remove mystery diacriticals -->
  <rule pattern="[öò]"> <!-- REMOVED ô - see above //MB -->
    <intermediate>o</intermediate>
  </rule>

  <!-- remove mystery diacriticals -->
  <rule pattern="[üù]"> <!-- REMOVED û - see above //MB -->
    <intermediate>u</intermediate>
  </rule>


  <!-- ADDED rules for long vowels with cirkumflex or macron //MB -->
  <rule pattern="[âā]">
    <intermediate>á</intermediate>
  </rule>
  <rule pattern="[êē]">
    <intermediate>é</intermediate>
  </rule>
  <rule pattern="[îī]">
    <intermediate>í</intermediate>
  </rule>
  <rule pattern="[ôō]">
    <intermediate>ó</intermediate>
  </rule>
  <rule pattern="[ûū]">
    <intermediate>ú</intermediate>
  </rule>


  <!-- NUMBERS -->

  <import filename="TengwarNumerals.xml"/>

  <!-- DIPHTHONGS -->

  <rule pattern="ai">
    <final>lE</final>
  </rule>

  <rule pattern="oi">
    <final>lY</final>
  </rule>

  <rule pattern="ui">
    <final>lU</final>
  </rule>

  <rule pattern="au">
    <final>.E</final>
  </rule>

  <rule pattern="eu">
    <final>.R</final>
  </rule>

  <rule pattern="iu">
    <final>.T</final>
  </rule>
  
  <!-- COMPOUND CONSONANTS -->

  <rule pattern="nkwa">
    <final>v#</final>
  </rule>

  <rule pattern="nkwe">
    <final>v$</final>
  </rule>

  <rule pattern="nkwi">
    <final>v%</final>
  </rule>

  <rule pattern="nkwo">
    <final>v^</final>
  </rule>

  <rule pattern="nkwu">
    <final>v&amp;</final>
  </rule>

  <rule pattern="nkw">
    <final>v</final>
  </rule>

  <rule pattern="ngwa">
    <final>x#</final>
  </rule>

  <rule pattern="ngwe">
    <final>x$</final>
  </rule>

  <rule pattern="ngwi">
    <final>x%</final>
  </rule>

  <rule pattern="ngwo">
    <final>x^</final>
  </rule>

  <rule pattern="ngwu">
    <final>x&amp;</final>
  </rule>

  <rule pattern="ngw">
    <final>x</final>
  </rule>

  <rule pattern="k{0,1}hwa">
    <final>x#</final>
  </rule>

  <rule pattern="k{0,1}hwe">
    <final>x$</final>
  </rule>

  <rule pattern="k{0,1}hwi">
    <final>x%</final>
  </rule>

  <rule pattern="k{0,1}hwo">
    <final>x^</final>
  </rule>

  <rule pattern="k{0,1}hwu">
    <final>x&amp;</final>
  </rule>

  <rule pattern="k{0,1}hw">
    <final>x</final>
  </rule>

  <rule pattern="nda">
    <final>2#</final>
  </rule>

  <rule pattern="nde">
    <final>2$</final>
  </rule>

  <rule pattern="ndi">
    <final>2%</final>
  </rule>

  <rule pattern="ndo">
    <final>2^</final>
  </rule>

  <rule pattern="ndu">
    <final>2&amp;</final>
  </rule>

  <rule pattern="nd">
    <final>2</final>
  </rule>

  <rule pattern="mba">
    <final>w#</final>
  </rule>

  <rule pattern="mbe">
    <final>w$</final>
  </rule>

  <rule pattern="mbi">
    <final>w%</final>
  </rule>

  <rule pattern="mbo">
    <final>w^</final>
  </rule>

  <rule pattern="mbu">
    <final>w&amp;</final>
  </rule>

  <rule pattern="mb">
    <final>w</final>
  </rule>

  <rule pattern="nga">
    <final>s#</final>
  </rule>

  <rule pattern="nge">
    <final>s$</final>
  </rule>

  <rule pattern="ngi">
    <final>s%</final>
  </rule>

  <rule pattern="ngo">
    <final>s^</final>
  </rule>

  <rule pattern="ngu">
    <final>s&amp;</final>
  </rule>

  <rule pattern="ng">
    <final>s</final>
  </rule>

  <rule pattern="tha">
    <final>3C</final>
  </rule>

  <rule pattern="the">
    <final>3V</final>
  </rule>

  <rule pattern="thi">
    <final>3B</final>
  </rule>

  <rule pattern="tho">
    <final>3N</final>
  </rule>

  <rule pattern="thu">
    <final>3M</final>
  </rule>

  <rule pattern="th">
    <final>3</final>
  </rule>

  <rule pattern="kha">
    <final>d#</final>
  </rule>

  <rule pattern="khe">
    <final>d$</final>
  </rule>

  <rule pattern="khi">
    <final>d%</final>
  </rule>

  <rule pattern="kho">
    <final>d^</final>
  </rule>

  <rule pattern="khu">
    <final>d&amp;</final>
  </rule>

  <rule pattern="kh">
    <final>d</final>
  </rule>

  <rule pattern="nta">
    <final>4#</final>
  </rule>

  <rule pattern="nte">
    <final>4$</final>
  </rule>

  <rule pattern="nti">
    <final>4%</final>
  </rule>

  <rule pattern="nto">
    <final>4^</final>
  </rule>

  <rule pattern="ntu">
    <final>4&amp;</final>
  </rule>

  <rule pattern="nt">
    <final>4</final>
  </rule>

  <rule pattern="mpa">
    <final>r#</final>
  </rule>

  <rule pattern="mpe">
    <final>r$</final>
  </rule>

  <rule pattern="mpi">
    <final>r%</final>
  </rule>

  <rule pattern="mpo">
    <final>r^</final>
  </rule>

  <rule pattern="mpu">
    <final>r&amp;</final>
  </rule>

  <rule pattern="mp">
    <final>r</final>
  </rule>

  <rule pattern="nka">
    <final>f#</final>
  </rule>

  <rule pattern="nke">
    <final>f$</final>
  </rule>

  <rule pattern="nki">
    <final>f%</final>
  </rule>

  <rule pattern="nko">
    <final>f^</final>
  </rule>

  <rule pattern="nku">
    <final>f&amp;</final>
  </rule>

  <rule pattern="nk">
    <final>f</final>
  </rule>

  <rule pattern="rda">
    <final>uE</final>
  </rule>

  <rule pattern="rde">
    <final>uR</final>
  </rule>

  <rule pattern="rdi">
    <final>uT</final>
  </rule>

  <rule pattern="rdo">
    <final>uY</final>
  </rule>

  <rule pattern="rdu">
    <final>uU</final>
  </rule>

  <rule pattern="rd">
    <final>u</final>
  </rule>

  <rule pattern="nwa">
    <final>b#</final>
  </rule>

  <rule pattern="nwe">
    <final>b$</final>
  </rule>

  <rule pattern="nwi">
    <final>b%</final>
  </rule>

  <rule pattern="nwo">
    <final>b^</final>
  </rule>

  <rule pattern="nwu">
    <final>b&amp;</final>
  </rule>

  <rule pattern="nw">
    <final>b</final>
  </rule>

  <rule pattern="lda">
    <final>mE</final>
  </rule>

  <rule pattern="lde">
    <final>mR</final>
  </rule>

  <rule pattern="ldi">
    <final>mT</final>
  </rule>

  <rule pattern="ldo">
    <final>mY</final>
  </rule>

  <rule pattern="ldu">
    <final>mU</final>
  </rule>

  <rule pattern="ld">
    <final>m</final>
  </rule>

<!-- REPLACED gn by ñ. This is Tolkien's most common way of denoting Quenya's archaic eng-sound as in noldo, when differentiated from nG as in anga //MB -->
  <rule pattern="ña"> 
    <final>g#</final>
  </rule>

  <rule pattern="ñe">
    <final>g$</final>
  </rule>

  <rule pattern="ñi">
    <final>g%</final>
  </rule>

  <rule pattern="ño">
    <final>g^</final>
  </rule>

  <rule pattern="ñu">
    <final>g&amp;</final>
  </rule>

  <rule pattern="ñ">
    <final>g</final>
  </rule>

  <rule pattern="kwa">
    <final>zE</final>
  </rule>

  <rule pattern="kwe">
    <final>zR</final>
  </rule>

  <rule pattern="kwi">
    <final>zT</final>
  </rule>

  <rule pattern="kwo">
    <final>zY</final>
  </rule>

  <rule pattern="kwu">
    <final>zU</final>
  </rule>

  <rule pattern="kw">
    <final>z</final>
  </rule>
  
  <!-- LONG (DOUBLE) CONSONANTS-->

  <rule pattern="ssa">
    <final>,E</final>
  </rule>

  <rule pattern="sse">
    <final>,R</final>
  </rule>

  <rule pattern="ssi">
    <final>,T</final>
  </rule>

  <rule pattern="sso">
    <final>,Y</final>
  </rule>

  <rule pattern="ssu">
    <final>,U</final>
  </rule>

  <rule pattern="ss">
    <final>k</final>
  </rule>

  <rule pattern="lla">
    <final>j°#</final> <!-- lambe should use the most left-shifted tehtar //MB -->
  </rule>

  <rule pattern="lle">
    <final>j°$</final>
  </rule>

  <rule pattern="lli">
    <final>j°^</final>
  </rule>

  <rule pattern="llo">
    <final>j°%</final>
  </rule>

  <rule pattern="llu">
    <final>j°&amp;</final>
  </rule>

  <rule pattern="ll">
    <final>j°</final>
  </rule>

  <rule pattern="tta">
    <final>1/E</final>
  </rule>

  <rule pattern="tte">
    <final>1/R</final>
  </rule>

  <rule pattern="tti">
    <final>1/T</final>
  </rule>

  <rule pattern="tto">
    <final>1/Y</final>
  </rule>

  <rule pattern="ttu">
    <final>1/U</final>
  </rule>

  <rule pattern="tt">
    <final>1/</final>
  </rule>

  <rule pattern="ppa">
    <final>q/E</final>
  </rule>

  <rule pattern="ppe">
    <final>q/R</final>
  </rule>

  <rule pattern="ppi">
    <final>q/T</final>
  </rule>

  <rule pattern="ppo">
    <final>q/Y</final>
  </rule>

  <rule pattern="ppu">
    <final>q/U</final>
  </rule>

  <rule pattern="pp">
    <final>q/</final>
  </rule>

  <rule pattern="kke">
    <final>a/R</final>
  </rule>

  <rule pattern="kki">
    <final>a/T</final>
  </rule>

  <rule pattern="kko">
    <final>a/Y</final>
  </rule>

  <rule pattern="kku">
    <final>a/U</final>
  </rule>

  <rule pattern="kk">
    <final>a/</final>
  </rule>

  <rule pattern="ffa">
    <final>e;D</final> <!-- REPLACED / by ; for bar under formen //MB -->
  </rule>

  <rule pattern="ffe">
    <final>e;F</final>
  </rule>

  <rule pattern="ffi">
    <final>e;G</final>
  </rule>

  <rule pattern="ffo">
    <final>e;H</final>
  </rule>

  <rule pattern="ffu">
    <final>e;J</final>
  </rule>

  <rule pattern="ff">
    <final>e;</final>
  </rule>

  <rule pattern="nna">
    <final>5:#</final> <!-- REPLACED ? by : for bar under númen //MB -->
  </rule>

  <rule pattern="nne">
    <final>5:$</final> 
  </rule>

  <rule pattern="nni">
    <final>5:%</final>
  </rule>

  <rule pattern="nno">
    <final>5:^</final>
  </rule>

  <rule pattern="nnu">
    <final>5:&amp;</final>
  </rule>

  <rule pattern="nn">
    <final>5:</final> <!-- REPLACED " by : for the sake of consistency //MB -->
  </rule>

  <rule pattern="mma">
    <final>t:#</final> <!-- REPLACED ? by : for bar under malta //MB -->
  </rule>

  <rule pattern="mme">
    <final>t:$</final>
  </rule>

  <rule pattern="mmi">
    <final>t:%</final>
  </rule>

  <rule pattern="mmo">
    <final>t:^</final>
  </rule>

  <rule pattern="mmu">
    <final>t:&amp;</final>
  </rule>

  <rule pattern="mm">
    <final>t:</final>
  </rule>

<!-- The following do not occur in Quenya, but may be included for the sake of completeness. //MB -->

  <rule pattern="vva"> <!-- REPLACED / by ; for bar under vala //MB -->
    <final>y;E</final>
  </rule>

  <rule pattern="vve">
    <final>y;R</final>
  </rule>

  <rule pattern="vvi">
    <final>y;T</final>
  </rule>

  <rule pattern="vvo">
    <final>y;Y</final>
  </rule>

  <rule pattern="vvu">
    <final>y;U</final>
  </rule>

  <rule pattern="vv">
    <final>y;</final>
  </rule>

  <rule pattern="wwa"> <!-- REPLACED / by ; for bar under vilya //MB -->
    <final>n;E</final>
  </rule>

  <rule pattern="wwe">
    <final>n;R</final>
  </rule>

  <rule pattern="wwi">
    <final>n;T</final>
  </rule>

  <rule pattern="wwo">
    <final>n;Y</final>
  </rule>

  <rule pattern="wwu">
    <final>n;U</final>
  </rule>

  <rule pattern="ww">
    <final>n;</final>
  </rule>

  <rule pattern="hha"> <!-- REPLACED / by ; for bar under hyarmen //MB -->
    <final>9;C</final> <!-- REPLACED ¯ by C for a-tehta over hyarmen //MB -->
  </rule>

  <rule pattern="hhe">
    <final>9;F</final>
  </rule>

  <rule pattern="hhi">
    <final>9;G</final>
  </rule>

  <rule pattern="hho">
    <final>9;H</final>
  </rule>

  <rule pattern="hhu">
    <final>9;J</final>
  </rule>

  <rule pattern="hh">
    <final>9;</final>
  </rule>
  
  <!-- SHORT (SINGLE) CONSONANTS-->

  <!-- ADDED rules for ry //MB -->
  <rule pattern="rya">
    <final>7ÎE</final>
  </rule>

  <rule pattern="rye">
    <final>7ÎR</final>
  </rule>

  <rule pattern="ryi">
    <final>7ÎT</final>
  </rule>

  <rule pattern="ryo">
    <final>7ÎY</final>
  </rule>

  <rule pattern="ryu">
    <final>7ÎU</final>
  </rule>

  <rule pattern="ry">
    <final>7Î</final>
  </rule>

  <!-- END ADDED rules for ry //MB -->

  <rule pattern="ra">
    <final>7E</final>
  </rule>

  <rule pattern="re">
    <final>7R</final>
  </rule>

  <rule pattern="ri">
    <final>7T</final>
  </rule>

  <rule pattern="ro">
    <final>7Y</final>
  </rule>

  <rule pattern="ru">
    <final>7U</final>
  </rule>

  <rule pattern="rá">
    <final>7~C</final>
  </rule>

  <rule pattern="ré">
    <final>7~V</final>
  </rule>

  <rule pattern="rí">
    <final>7~B</final>
  </rule>

  <rule pattern="ró">
    <final>7~N</final>
  </rule>

  <rule pattern="rú">
    <final>7~M</final>
  </rule>

  <rule pattern="r">
    <final>6</final>
  </rule>

  <rule pattern="sya">
    <final>iÎE</final>
  </rule>

  <rule pattern="sye">
    <final>iÎR</final>
  </rule>

  <rule pattern="syi">
    <final>iÎT</final>
  </rule>

  <rule pattern="syo">
    <final>iÎY</final>
  </rule>

  <rule pattern="syu">
    <final>iÎU</final>
  </rule>

  <rule pattern="sa">
    <final>iE</final>
  </rule>

  <rule pattern="se">
    <final>iR</final>
  </rule>

  <rule pattern="si">
    <final>iT</final>
  </rule>

  <rule pattern="so">
    <final>iY</final>
  </rule>

  <rule pattern="su">
    <final>iU</final>
  </rule>

  <rule pattern="sy">
    <final>8Î</final>
  </rule>

  <rule pattern="s">
    <final>8</final>
  </rule>

  <rule pattern="lya"> <!-- lambe should use the most left-shifted tehtar //MB -->
    <final>j´#</final>
  </rule>

  <rule pattern="lye">
    <final>j´$</final>
  </rule>

  <rule pattern="lyi">
    <final>j´%</final>
  </rule>

  <rule pattern="lyo">
    <final>j´^</final>
  </rule>

  <rule pattern="lyu">
    <final>j´&amp;</final>
  </rule>

  <rule pattern="la">
    <final>j#</final>
  </rule>

  <rule pattern="le">
    <final>j$</final>
  </rule>

  <rule pattern="li">
    <final>j%</final>
  </rule>

  <rule pattern="lo">
    <final>j^</final>
  </rule>

  <rule pattern="lu">
    <final>j&amp;</final>
  </rule>

  <rule pattern="ly">
    <final>j´</final>
  </rule>

  <rule pattern="l">
    <final>j</final>
  </rule>

  <rule pattern="tya">
    <final>1ÎE</final>
  </rule>

  <rule pattern="tye">
    <final>1ÎR</final>
  </rule>

  <rule pattern="tyi">
    <final>1ÎT</final>
  </rule>

  <rule pattern="tyo">
    <final>1ÎY</final>
  </rule>

  <rule pattern="tyu">
    <final>1ÎU</final>
  </rule>

  <rule pattern="ta">
    <final>1E</final>
  </rule>

  <rule pattern="te">
    <final>1R</final>
  </rule>

  <rule pattern="ti">
    <final>1T</final>
  </rule>

  <rule pattern="to">
    <final>1Y</final>
  </rule>

  <rule pattern="tu">
    <final>1U</final>
  </rule>

  <rule pattern="ty">
    <final>1Î</final>
  </rule>

  <rule pattern="t">
    <final>1</final>
  </rule>

  <rule pattern="pya">
    <final>qÎE</final>
  </rule>

  <rule pattern="pye">
    <final>qÎR</final>
  </rule>

  <rule pattern="pyi">
    <final>qÎT</final>
  </rule>

  <rule pattern="pyo">
    <final>qÎY</final>
  </rule>

  <rule pattern="pyu">
    <final>qÎU</final>
  </rule>

  <rule pattern="pa">
    <final>qE</final>
  </rule>

  <rule pattern="pe">
    <final>qR</final>
  </rule>

  <rule pattern="pi">
    <final>qT</final>
  </rule>

  <rule pattern="po">
    <final>qY</final>
  </rule>

  <rule pattern="pu">
    <final>qU</final>
  </rule>

  <rule pattern="py">
    <final>qÎ</final>
  </rule>

  <rule pattern="p">
    <final>q</final>
  </rule>

  <rule pattern="kya">
    <final>aÌE</final>
  </rule>

  <rule pattern="kye">
    <final>aÌR</final>
  </rule>

  <rule pattern="kyi">
    <final>aÌT</final>
  </rule>

  <rule pattern="kyo">
    <final>aÌY</final>
  </rule>

  <rule pattern="kyu">
    <final>aÌU</final>
  </rule>

  <rule pattern="ka">
    <final>aE</final>
  </rule>

  <rule pattern="ke">
    <final>aR</final>
  </rule>

  <rule pattern="ki">
    <final>aT</final>
  </rule>

  <rule pattern="ko">
    <final>aY</final>
  </rule>

  <rule pattern="ku">
    <final>aU</final>
  </rule>

  <rule pattern="ky">
    <final>aÌ</final>
  </rule>

  <rule pattern="k">
    <final>a</final>
  </rule>

  <rule pattern="fya">
    <final>eÍD</final>
  </rule>

  <rule pattern="fye">
    <final>eÍF</final>
  </rule>

  <rule pattern="fyi">
    <final>eÍG</final>
  </rule>

  <rule pattern="fyo">
    <final>eÍH</final>
  </rule>

  <rule pattern="fyu">
    <final>eÍJ</final>
  </rule>

  <rule pattern="fa">
    <final>eD</final>
  </rule>

  <rule pattern="fe">
    <final>eF</final>
  </rule>

  <rule pattern="fi">
    <final>eG</final>
  </rule>

  <rule pattern="fo">
    <final>eH</final>
  </rule>

  <rule pattern="fu">
    <final>eJ</final>
  </rule>

  <rule pattern="fy">
    <final>eÍ</final>
  </rule>

  <rule pattern="f">
    <final>e</final>
  </rule>

  <rule pattern="nya">
    <final>5Ì#</final>
  </rule>

  <rule pattern="nye">
    <final>5Ì$</final>
  </rule>

  <rule pattern="nyi">
    <final>5Ì%</final>
  </rule>

  <rule pattern="nyo">
    <final>5Ì^</final>
  </rule>

  <rule pattern="nyu">
    <final>5Ì&amp;</final>
  </rule>

  <rule pattern="na">
    <final>5#</final>
  </rule>

  <rule pattern="ne">
    <final>5$</final>
  </rule>

  <rule pattern="ni">
    <final>5%</final>
  </rule>

  <rule pattern="no">
    <final>5^</final>
  </rule>

  <rule pattern="nu">
    <final>5&amp;</final>
  </rule>

  <rule pattern="ny">
    <final>5Ì</final>
  </rule>

  <rule pattern="n">
    <final>5</final>
  </rule>

  <rule pattern="mya">
    <final>tÌ#</final>
  </rule>

  <rule pattern="mye">
    <final>tÌ$</final>
  </rule>

  <rule pattern="myi">
    <final>tÌ%</final>
  </rule>

  <rule pattern="myo">
    <final>tÌ^</final>
  </rule>

  <rule pattern="myu">
    <final>tÌ&amp;</final>
  </rule>

  <rule pattern="ma">
    <final>t#</final>
  </rule>

  <rule pattern="me">
    <final>t$</final>
  </rule>

  <rule pattern="mi">
    <final>t%</final>
  </rule>

  <rule pattern="mo">
    <final>t^</final>
  </rule>

  <rule pattern="mu">
    <final>t&amp;</final>
  </rule>

  <rule pattern="my">
    <final>tÌ</final>
  </rule>

  <rule pattern="m">
    <final>t</final>
  </rule>

  <rule pattern="vya">
    <final>yÍE</final>
  </rule>

  <rule pattern="vye">
    <final>yÍR</final>
  </rule>

  <rule pattern="vyi">
    <final>yÍT</final>
  </rule>

  <rule pattern="vyo">
    <final>yÍY</final>
  </rule>

  <rule pattern="vyu">
    <final>yÍU</final>
  </rule>

  <rule pattern="va">
    <final>yE</final>
  </rule>

  <rule pattern="ve">
    <final>yR</final>
  </rule>

  <rule pattern="vi">
    <final>yT</final>
  </rule>

  <rule pattern="vo">
    <final>yY</final>
  </rule>

  <rule pattern="vu">
    <final>yU</final>
  </rule>

  <rule pattern="vy">
    <final>yÍ</final>
  </rule>

  <rule pattern="v">
    <final>y</final>
  </rule>

  <rule pattern="wya">
    <final>nÍE</final>
  </rule>

  <rule pattern="wye">
    <final>nÍR</final>
  </rule>

  <rule pattern="wyi">
    <final>nÍT</final>
  </rule>

  <rule pattern="wyo">
    <final>nÍY</final>
  </rule>

  <rule pattern="wyu">
    <final>nÍU</final>
  </rule>

  <rule pattern="wa">
    <final>nE</final>
  </rule>

  <rule pattern="we">
    <final>nR</final>
  </rule>

  <rule pattern="wi">
    <final>nT</final>
  </rule>

  <rule pattern="wo">
    <final>nY</final>
  </rule>

  <rule pattern="wu">
    <final>nU</final>
  </rule>

  <rule pattern="wy">
    <final>nÍ</final>
  </rule>

  <rule pattern="w">
    <final>n</final>
  </rule>

  <rule pattern="hya">
    <final>9ÍC</final> <!-- REPLACED ¯ by C for a-tehta over hyarmen //MB -->
  </rule>

  <rule pattern="hye">
    <final>9ÍF</final>
  </rule>

  <rule pattern="hyi">
    <final>9ÍG</final>
  </rule>

  <rule pattern="hyo">
    <final>9ÍH</final>
  </rule>

  <rule pattern="hyu">
    <final>9ÍJ</final>
  </rule>

  <rule pattern="ha">
    <final>9C</final> <!-- REPLACED ¯ by C for a-tehta over hyarmen //MB -->
  </rule>

  <rule pattern="he">
    <final>9F</final>
  </rule>

  <rule pattern="hi">
    <final>9G</final>
  </rule>

  <rule pattern="ho">
    <final>9H</final>
  </rule>

  <rule pattern="hu">
    <final>9J</final>
  </rule>

  <rule pattern="hy">
    <final>9Í</final>
  </rule>

  <rule pattern="h">
    <final>9</final>
  </rule>

  <rule pattern="ya">
    <final>hÍE</final>
  </rule>

  <rule pattern="ye">
    <final>hÍR</final>
  </rule>

  <rule pattern="yi">
    <final>hÍT</final>
  </rule>

  <rule pattern="yo">
    <final>hÍY</final>
  </rule>

  <rule pattern="yu">
    <final>hÍU</final>
  </rule>

  <rule pattern="y">
    <final>hÍ</final>
  </rule>
  
  <!-- LONG VOWELS-->

  <rule pattern="á">
    <final>~C</final>
  </rule>

  <rule pattern="é">
    <final>~V</final>
  </rule>

  <rule pattern="í">
    <final>~B</final>
  </rule>

  <rule pattern="ó">
    <final>~N</final>
  </rule>

  <rule pattern="ú">
    <final>~M</final>
  </rule>

  <!-- SHORT VOWELS-->

  <rule pattern="a">
    <final>`C</final>
  </rule>

  <rule pattern="e">
    <final>`V</final>
  </rule>

  <rule pattern="i">
    <final>`B</final>
  </rule>

  <rule pattern="o">
    <final>`N</final>
  </rule>

  <rule pattern="u">
    <final>`M</final>
  </rule>

<!-- This does not occur in Quenya //MB
  <rule pattern="ə">
    <final>¼</final>
  </rule>
  
-->

  <!-- PUNCTUATION / WHITESPACE -->

  <rule pattern="(\s+)">
    <final>$1</final>
  </rule>

  <rule pattern="!">
    <final>Á</final>
  </rule>

  <rule pattern="\?">
    <final>À</final>
  </rule>

  <rule pattern="\p{Ps}|\p{Pe}">
    <final>›</final>
  </rule>

  <rule pattern="\p{Pd}">
<!-- Dash should be transcribed as nothing. See "lisse-miruvóreva" in Namárie //MB
    <final>Â</final>
-->
    <final></final>
  </rule>


  <rule pattern=",">
    <final>=</final> <!-- REPLACED ˆ by = //MB -->
  </rule>

  <rule pattern="\.">
    <final>-</final> <!-- REPLACED = by - //MB -->
  </rule>
  <!-- Ideally, period *at paragraph end* should be transcribed as two dashes //MB -->

</rules>